package com.wwwarehouse.carddesk.adapter.teamadapter;

import android.os.Parcelable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.view.ViewGroup;

import java.util.List;

/**
 * 带有reStoreStatePager
 * Created by ShineF on 2017/9/25 0025.
 */

public class TeamSelectPermissionPagerAdapter extends FragmentStatePagerAdapter {

    private List<Fragment> mTabContents;

    public TeamSelectPermissionPagerAdapter(FragmentManager fm, List<Fragment> mTabContents) {
        super(fm);
        this.mTabContents = mTabContents;
    }

    public int getCount() {
        return this.mTabContents.size();
    }

    public Fragment getItem(int arg0) {
        return (Fragment) this.mTabContents.get(arg0);
    }

    public int getItemPosition(Object object) {
        return -2;
    }

    public void destroyItem(ViewGroup container, int position, Object object) {
    }

    @Override
    public void restoreState(Parcelable state, ClassLoader loader) {
    }

    public void setList(List<Fragment> mTabContents) {
        this.mTabContents = mTabContents;
    }
}
